import request from "../utils/request";

export const getAllArticle = () => {
  return request({
    method: 'GET',
    url: '/article/'
  })
}

export const Publish = data => {
  return request({
    headers: {
      "Content-Type": "multipart/form-data"
    },
    method: "POST",
    url: '/article/',
    data
  })
}

export const getArticleById = id => {
  return request({
    method: 'GET',
    url: `/article/${id}`
  })
}